public class shuzuTest {
    public static void main(String[] args) {
        int[][] array = new int[5][6];
        int row = array.length;
        int col = array[0].length;
        int[][] arrayT = new int[col][row];
        for(int i= 0;i<array.length;i++){
            for(int j= 0;j<array[i].length;j++){
                array[i][j] = i+j;
                System.out.print(array[i][j]+" ");
            }
            System.out.println();
        }
        System.out.println("转置后的数组");
        for(int i =0;i<=arrayT.length;i++){
            for(int j=0;j<arrayT[i].length;j++){
                arrayT[i][j] = array[j][i];
                System.out.print(arrayT[i][j]+" ");
            }
            System.out.println();
        }
    }
    
}
